package com.suredy.app.porject.model;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.suredy.core.model.BaseModel;
import com.suredy.security.entity.OrgEntity;

/**
 * 招标代理机构
 * 
 * @author VIVID.G
 * @since 2015-10-12
 * @version v0.1
 */
@Entity
@Table(name = "tb_bid_agency")
public class BidAgency extends BaseModel {

	private static final long serialVersionUID = 1L;

	/* 招标代理机构 */
	@Column(length = 200, nullable = false)
	private String company;

	/* 代理机构地址 */
	@Column(length = 500)
	private String addr;

	/* 邮编 */
	@Column(name = "zip", length = 10)
	private String zip;

	/* 网址 */
	@Column(name = "url", length = 500)
	private String url;

	/* 开户名称 */
	@Column(name = "account_name", length = 200)
	private String accountName;

	/* 开户银行 */
	@Column(name = "account_bank", length = 200)
	private String accountBank;

	/* 开户帐号 */
	@Column(name = "account_no", length = 30)
	private String accountNo;

	/* 信息归属单位 */
	@ManyToOne(cascade = CascadeType.REFRESH, fetch = FetchType.LAZY)
	@JoinColumn(name = "org_id")
	private OrgEntity owner;

	public String getCompany() {
		return company;
	}

	public void setCompany(String company) {
		this.company = company;
	}

	public String getAddr() {
		return addr;
	}

	public void setAddr(String addr) {
		this.addr = addr;
	}

	public String getZip() {
		return zip;
	}

	public void setZip(String zip) {
		this.zip = zip;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getAccountName() {
		return accountName;
	}

	public void setAccountName(String accountName) {
		this.accountName = accountName;
	}

	public String getAccountBank() {
		return accountBank;
	}

	public void setAccountBank(String accountBank) {
		this.accountBank = accountBank;
	}

	public String getAccountNo() {
		return accountNo;
	}

	public void setAccountNo(String accountNo) {
		this.accountNo = accountNo;
	}

	public OrgEntity getOwner() {
		return owner;
	}

	public void setOwner(OrgEntity owner) {
		this.owner = owner;
	}

}
